import { Action, ActionKey, validateGroupWindow } from  "@/mdesign-lib/mdesign-app.umd.js";

export class ValidateGroupAction extends Action {
  keyName = ActionKey.validateGroup;

  desc = "校验分组";

  onSysMenuClick() {
    this.run();
  }
  async run() {
    const project = app.activeProject;
    if (!project) return;

    validateGroupWindow.popup({ projectId: project.id, isEdit: true }, async res => {
      if (res.success) {
        validateGroupWindow.done();
      }
    });
  }
}
